Skip to content

refactor: adopt CliError in social adapters#375

Merged
jackwener merged 1 commit intomainfrom
codex/clierror-social-followup
Mar 24, 2026
Merged

refactor: adopt CliError in social adapters#375
jackwener merged 1 commit intomainfrom
codex/clierror-social-followup

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary

  • replace raw Error throws in twitter, reddit, v2ex, and substack adapters with CliError subclasses
  • use AuthRequiredError for missing login state and CommandExecutionError for execution/API failures
  • normalize browser-required checks to consistent error messages

Validation

  • npm test
  • npm run typecheck
  • npm run build

@jackwener
Copy link
Copy Markdown
Owner Author

Validation complete.

  • npm test
  • npm run typecheck
  • npm run build

This round focuses on twitter, reddit, v2ex, and substack adapters only.

@jackwener jackwener merged commit 180e7ea into main Mar 24, 2026
11 checks passed
jackwener added a commit that referenced this pull request Mar 24, 2026
Replace raw Error throws with appropriate CliError subclasses in:
- antigravity (5 files): SelectorError for UI elements
- barchart (1 file): AuthRequiredError for login issues
- boss (7 files): AuthRequiredError, CommandExecutionError, SelectorError, EmptyResultError
- chaoxing (1 file): CommandExecutionError
- coupang (2 files): ArgumentError, CommandExecutionError
- discord-app (2 files): SelectorError for UI elements
- douban (1 file): EmptyResultError
- doubao-app (2 files): CommandExecutionError, SelectorError
- notion (1 file): SelectorError for UI elements
- sinablog (1 file): CommandExecutionError
- xiaohongshu (7 files): AuthRequiredError, CommandExecutionError, EmptyResultError, ArgumentError, TimeoutError

Based on work from @coding-claude-opus (PR #374), excludes social adapters
already covered by PR #375.
jackwener added a commit that referenced this pull request Mar 24, 2026
Replace raw Error throws with appropriate CliError subclasses in:
- antigravity (5 files): SelectorError for UI elements
- barchart (1 file): AuthRequiredError for login issues
- boss (7 files): AuthRequiredError, CommandExecutionError, SelectorError, EmptyResultError
- chaoxing (1 file): CommandExecutionError
- coupang (2 files): ArgumentError, CommandExecutionError
- discord-app (2 files): SelectorError for UI elements
- douban (1 file): EmptyResultError
- doubao-app (2 files): CommandExecutionError, SelectorError
- notion (1 file): SelectorError for UI elements
- sinablog (1 file): CommandExecutionError
- xiaohongshu (7 files): AuthRequiredError, CommandExecutionError, EmptyResultError, ArgumentError, TimeoutError

Based on work from @coding-claude-opus (PR #374), excludes social adapters
already covered by PR #375.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant